package zhr.chapter5.zuoye;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class test {
    public static void main(String[] args) {
        double a =99.9999;
        BigDecimal b = new BigDecimal(a);
        double c = b.setScale(2, RoundingMode.DOWN).doubleValue(); //ROUND_DOWN直接去掉尾数
        System.out.println(c);
    }
}
